home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
126-150
/
scopedisk131
/
extract
/
extract.doc
< prev
next >
Wrap
Text File
|
1995-03-19
|
8KB
|
175 lines
Extract by The Mad Scientist
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This is the documentation for the latest version of Extract, a program to
help you decode text from encrypted (or non-encrypted) binary files.
Have you ever gotten a program that you can't use because you don't have
the code words that it requires (maybe the dog devoured your docs)? It would
be a great help if you could had the list of words that the program picks
from, at least this would be a starting point to get into the program. Or,
perhaps you like to play adventure games, but need one tiny hint to get in
that final dungeon (or maybe you would like to make a walk-through).
Usually, you can't just type or edit the file that contains this valuable
information, typically it is a binary file. And the file is usually
encrypted, so that even if you do type the file, it is just garbage. Extract
is the answer. It will extract just printable characters from any binary
file, and optionally process them according to a de-cryption script that
you specify (see section on scripts). Any part of the file may be printed,
or the final output file (optional) may be loaded into any text editor.
USAGE: Extract source-file
EXAMPLE: Extract ram:u3mod2.dat (u3mod2.dat is a Universe 3 data file)
The entire source file is not loaded into memory at once, only one screen
at a time is kept in memory. This allows you to process a file of any size.
The Gadgets:
~~~~~~~~~~~~
Extract-screen.pic shows which gadget is which.
If you click on a gadget and the screen flashes, it usually means that
the option is not available right now. For example, if you try to clear a
script and none is present, or if you enter illegal input into the input
gadget, the screen will flash. The current screen will usually be
displayed after each gadget selection, to update any changes you have made.
EXIT : This gadget exits the program.
Input Gadget: This gadget is automatically activated when the program
requires input. Enter the desired input, and press
return. You will have to backspace any leftover input
from the previous use of this gadget.
Page Up : This reads the next section in the source file, and
displays it after it is processed by the script. You cannot
page down past the end of the file.
Page Down : This reads the previous section in the source file, and
displays it after it is processed by the script. You
page up past the beginning of the file.
Continue Up : This toggle gadget is like the page up gadget, except that
it will scroll through the entire file until it is clicked
of, or until the end of file is reached.
Continue Dn : This toggle gadget is like the page down gadget, except that
it will scroll through the entire file until it is clicked
of, or until the start of file is reached.
P-Format : This is a toggle gadget (click on, click again off) that
determines what characters are extracted. When this
gadget is selected, all printable characters are shown.
If it is not selected, only letters are shown.
S-Format : This toggle gadget determines whether dots (unselected)
or spaces (selected) replace non-extracted characters.
This gadget affects the way an entire file is processes, see
Write File below.
Print Screen: This gadget will send the contents of the current screen
to your printer. The printer must be online.
Clear Script: This gadget will clear any script that is in memory.
Byte Count : This gadget will count the number of each byte in the
current file, and send the output to a file you specify.
This gadget activates the text gadget, where you must enter
the file name to send the byte count to. The most useful place
to send a byte count is to the printer (prt:). A byte count
table can be VERY useful in determining de-cryption values
to use in a script. Characters are counted AFTER the current
script is applied.
Write File : This gadget will process the current file according to the
current script, and save the output in a file. This gadget
activates the text gadget, where you must enter the file
name to send the output to. If the S-Format gadget is
selected, spaces will replace non-printable characters. In
This mode, the P-Format gadget has no effect, all printable
characters are output, not just letters. If the S-Format
gadget is not selected, all characters are output after
processing, whether they are printable or not.
Scripts, Script Gadgets, And Decrypt Gadgets
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Scripts are optional. When a script is present, de-cryption values are
applied in the order that they were put into the script. The order is
important, and the same values in different orders will usually have
drastically different results. Scripts may have up to 254 elements, although
most will need only one or two elements.
Load : This will load a script into memory, and apply it to the current
screen. You may not load a script if one is already present,
select the Clear Script gadget first. This gadget uses the input
gadget, enter the name of the script to load in the input gadget.
Save : This will save the the current script (if there is one). This
gadget also activates the input gadget.
<- : The small back gadget will delete the last entry in the script.
Up/Dn : These gadgets are the same (I was lazy, it was late, and I was
tired), they will display the entire current script.
Decrypt Gadgets
~~~~~~~~~~~~~~~
These gadgets enter add to the end of the current script. They all use
the input gadget (except the NOT gadget) to enter values. The screen will
flash if your input is un-acceptable. You may use any combination of these,
as each element in the script has it's own value.
EOR : Bitwise EOR bytes with the EOR value.
Values are from 0 to 255.
NOT : This inverts the bits in each byte (bitwise NOT).
AND : Bitwise AND bytes with the AND value.
Values are from 0 to 255.
OR : Bitwise OR with the OR with value.
Values are from 0 to 255.
+ : ADD value to bytes.
Values are from 0 to 255.
If a result exceeds 255, it rolls over, for example 255 + 1 = 0.
- : SUBTRACT value from bytes.
Values are from 0 to 255.
If a result is less than 0 it rolls under, for example 0 - 2 = 254.
LS : Bit shift left by value.
Values are from 0 to 7.
RS : Bit shift right by value.
Values are from 0 to 7.
b%x : byte MOD value (math remainder function).
Values are from 1 to 255.
x%b : value MOD byte (math remainder function).
Values are from 0 to 255 (0 is somewhat useless).
Note that if byte = 0, a division by zero error would
result. These are trapped, and a 0 returned.
De-cryption Hints
~~~~~~~~~~~~~~~~~
Of course, the hard part is comming up with scripts for encrypted
programs, I can't help you much there, but often you will get a clue by
dis-assembling the program in question, or by running it under a debugger.
A byte count table is very useful in de-crypting files. For example, if
all the bytes are grouped together over a small range, you probably just
have to add or subtract. On the other hand, if they are scattered over
all 256 values (0 to 255), then you probably need a combination of functions,
probably MOD and EOR... You don't actually need the same method that was
used to en-crypt the file, sometimes other functions will produce the
same results.